package zj.xinxin.api.moudle.article.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 评论 
 * </p>
 *
 * @author zhoujun
 * @since 2022-04-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class DiscussVo implements Serializable {

    @ApiModelProperty(value = "评论ID")
    private Long discussId;

    @ApiModelProperty(value = "评论日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "点赞数")
    private Integer likeCount;

    @ApiModelProperty(value = "发表用户")
    private Long discussUser;

    @ApiModelProperty(value = "评论文章ID")
    @NotNull(message = "评论的文章Id不能为空！")
    private Long articleId;

    @ApiModelProperty(value = "评论内容")
    @NotBlank(message = "评论内容不能为空！")
    private String content;

    @ApiModelProperty(value = "父评论ID")
    private Long parentId;

}
